package cn.edu.sdju.fengguoyu.po;

import cn.edu.sdju.fengguoyu.ahoedgemonitor.Sprite;
import javafx.beans.property.IntegerProperty;
import javafx.beans.property.SimpleIntegerProperty;
import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;

public class ServiceInfoTableRow {
    private Sprite sprite = null;
    private final IntegerProperty id = new SimpleIntegerProperty(this, "id");
    private final IntegerProperty rank = new SimpleIntegerProperty(this, "rank");
    private final StringProperty type = new SimpleStringProperty(this, "type");

    private final StringProperty named = new SimpleStringProperty(this, "named");
    private final StringProperty serviceAddress = new SimpleStringProperty(this, "serviceAddress");
    private final StringProperty serviceStatus = new SimpleStringProperty(this, "serviceStatus");

    public int getRank() {
        return rank.get();
    }

    public Sprite getSprite() {
        return sprite;
    }
    public void setSprite(Sprite sprite) {
        this.sprite = sprite;
    }
    public String getType() {
        return type.get();
    }
    public void setType(String type) {
        this.type.set(type);
    }
    public void setRank(Integer rank) {this.rank.set(rank);}

    public int getId() {
        return id.get();
    }
    public void setId(Integer id) {
        this.id.set(id);
    }

    public void setNamed(String named) {
        this.named.set(named);
    }

    public String getNamed() {
        return named.get();
    }


    public void setServerAddress(String serverAddress) {
        this.serviceAddress.set(serverAddress);
    }

    public String getServiceAddress() {
        return serviceAddress.get();
    }

    public String getServiceStatus() {
        return serviceStatus.get();
    }

    public void setServiceStatus(String serviceStatus) {
        this.serviceStatus.set(serviceStatus);
    }
    public  ServiceInfoTableRow (Integer id,String named, String serviceAddress, String serviceStatus) {
        setId(id);
        setNamed(named);
        setServerAddress(serviceAddress);
        setServiceStatus(serviceStatus);
    }
}
